import requests


headers = {
    "authority": "cn.bing.com",
    "accept": "*/*",
    "accept-language": "zh-CN,zh;q=0.9",
    "cache-control": "no-cache",
    "pragma": "no-cache",
    "referer": "https://cn.bing.com/images/search?q=%E8%B7%AF%E4%BA%BA&form=HDRSC2&first=1&cw=1177&ch=929",
    "sec-ch-ua": "\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"",
    "sec-ch-ua-arch": "\"x86\"",
    "sec-ch-ua-bitness": "\"64\"",
    "sec-ch-ua-full-version": "\"117.0.5938.149\"",
    "sec-ch-ua-full-version-list": "\"Google Chrome\";v=\"117.0.5938.149\", \"Not;A=Brand\";v=\"8.0.0.0\", \"Chromium\";v=\"117.0.5938.149\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-model": "\"\"",
    "sec-ch-ua-platform": "\"Linux\"",
    "sec-ch-ua-platform-version": "\"5.15.0\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
}
cookies = {
    "_IDET": "MIExp=0&VSNoti2=20230905",
    "MUID": "22AC14C3CC7161BE35F307BDCDB16074",
    "SRCHD": "AF=NOFORM",
    "SRCHUID": "V=2&GUID=509CD84DDDEE451B81F353352EC11217&dmnchg=1",
    "_UR": "QS=0&TQS=0",
    "MMCASM": "ID=C97FA632CD7D49E6B6BA5A611262424E",
    "MUIDB": "22AC14C3CC7161BE35F307BDCDB16074",
    "MicrosoftApplicationsTelemetryDeviceId": "ac12ae6c-86b1-4161-b6d7-b9f1cc614917",
    "ABDEF": "V=13&ABDV=13&MRNB=1694482647722&MRB=0",
    "_Rwho": "u=d",
    "_EDGE_S": "SID=3874A986B86B6D053163BA28B9286C93&ui=zh-cn",
    "ENSEARCH": "BENVER=0",
    "USRLOC": "HS=1&ELOC=LAT=29.873886108398438|LON=121.55025482177734|N=%E5%AE%81%E6%B3%A2%EF%BC%8C%E6%B5%99%E6%B1%9F%E7%9C%81|ELT=1|",
    "SNRHOP": "I=&TS=",
    "_HPVN": "CS=eyJQbiI6eyJDbiI6NCwiU3QiOjAsIlFzIjowLCJQcm9kIjoiUCJ9LCJTYyI6eyJDbiI6NCwiU3QiOjAsIlFzIjowLCJQcm9kIjoiSCJ9LCJReiI6eyJDbiI6NCwiU3QiOjAsIlFzIjowLCJQcm9kIjoiVCJ9LCJBcCI6dHJ1ZSwiTXV0ZSI6dHJ1ZSwiTGFkIjoiMjAyMy0xMC0yMFQwMDowMDowMFoiLCJJb3RkIjowLCJHd2IiOjAsIkRmdCI6bnVsbCwiTXZzIjowLCJGbHQiOjAsIkltcCI6MjN9",
    "ipv6": "hit=1697775456071&t=4",
    "ai_session": "S1yJDxIU1l1S70+s0//aX1|1697771857076|1697771952521",
    "SRCHUSR": "DOB=20230905&T=1697771855000&TPC=1697771956000",
    "_RwBf": "r=0&ilt=32&ihpd=1&ispd=1&rc=66&rb=0&gb=0&rg=200&pc=63&mtu=0&rbb=0&g=0&cid=&clo=0&v=4&l=2023-10-19T07:00:00.0000000Z&lft=0001-01-01T00:00:00.0000000&aof=0&o=2&p=&c=&t=0&s=0001-01-01T00:00:00.0000000+00:00&ts=2023-10-20T03:19:29.6609011+00:00&rwred=0&wls=&wlb=&lka=0&lkt=0&TH=&aad=0",
    "_SS": "SID=3874A986B86B6D053163BA28B9286C93&R=66&RB=0&GB=0&RG=200&RP=63",
    "SRCHHPGUSR": "SRCHLANG=zh-Hans&BRW=HTP&BRH=M&CW=996&CH=944&SCW=1177&SCH=2080&DPR=1.0&UTC=480&DM=0&PV=5.15.0&PRVCW=996&PRVCH=944&HV=1697771971&WTS=63833368754&IG=3855D085AD64442A982F632B5E62A1BB&BZA=0"
}
url = "https://cn.bing.com/images/async"
params = {
    "q": "路人",
    "first": "36",
    "count": "35",
    "cw": "1177",
    "ch": "929",
    "relp": "35",
    "datsrc": "I",
    "layout": "RowBased_Landscape",
    "apc": "0",
    "mmasync": "1",
    "dgState": "x*933_y*1318_h*181_c*3_i*36_r*8",
    "IG": "6F22E0A4FAF245859B3CA91FFC9F39FA",
    "SFX": "2",
    "iid": "images.5567"}
response = requests.get(url, headers=headers, cookies=cookies, params=params)

print(response.text)
print(response)